-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add string representation to log level #49
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
log.go
Outdated
@@ -37,6 +37,11 @@ import "unsafe" | |||
|
|||
type LogLevel int | |||
|
|||
// https://github.com/FFmpeg/FFmpeg/blob/release/5.1/libavutil/log.c#L268 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the comment here?
log.go
Outdated
@@ -37,6 +37,11 @@ import "unsafe" | |||
|
|||
type LogLevel int | |||
|
|||
// https://github.com/FFmpeg/FFmpeg/blob/release/5.1/libavutil/log.c#L268 | |||
func (l LogLevel) String() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this function below constants?
log_test.go
Outdated
@@ -19,6 +19,7 @@ func TestLog(t *testing.T) { | |||
lis = append(lis, logItem{ | |||
fmt: fmt, | |||
l: l, | |||
lString: l.String(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove lString
s and instead add require.Equal(t, "error", astiav.LogLevelError)
at the top of the test function?
I see |
It seems it won't work since is not exposed :(
|
I'll close it for now. |
No description provided.